Added error message if the user attempts to shutdown Domain-0.
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Wed, 14 Dec 2005 12:03:40 +0000 (12:03 +0000)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Wed, 14 Dec 2005 12:03:40 +0000 (12:03 +0000)
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
tools/python/xen/xm/shutdown.py

index c32dbc616a03a3231e526a1e366948e4ba3ba831..da880adc8cd6123b289b3def6058717ebf02401d 100644 (file)
@@ -57,7 +57,10 @@ def shutdown(opts, doms, mode, wait):
     dom0_name = sxp.child_value(server.xend_domain(0), 'name')
     for x in [dom0_name, DOM0_ID]:
         if x in doms:
-            doms.remove(x)
+            if opts.vals.all:
+                doms.remove(x)
+            else:
+                opts.err("Can't specify Domain-0")
     for d in doms:
         server.xend_domain_shutdown(d, mode)
     if wait: